package net.oschina.app.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

import java.util.List;

/**
 * Created by foty on 2017/4/1.
 * ?
 */

public class ViewPagerAdapter extends FragmentStatePagerAdapter{
    public List<Fragment> listF;
    public ViewPagerAdapter(FragmentManager fm, List<Fragment> listF) {
        super(fm);
        this.listF = listF;
    }

    @Override
    public Fragment getItem(int position) {
        return listF.get(position);
    }


    @Override
    public int getCount() {
        return listF.size();
    }

    /*@Override
    public void destroyItem(ViewGroup container, int position, Object object) {
        container.removeView((View) object);
    }*/
}
